Skip to content

Conversation

@Anmol202005
Copy link
Collaborator

Fixes: #101

- org.openrewrite.java.recipes.RecipeEqualsAndHashCodeCallSuper
- org.openrewrite.java.recipes.UseTreeRandomId
- org.openrewrite.java.recipes.migrate.RemoveTraitsUsageRecipes
- org.openrewrite.staticanalysis.NeedBraces
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- org.openrewrite.staticanalysis.NeedBraces
- org.openrewrite.java.InlineMethodCalls
- org.openrewrite.staticanalysis.NeedBraces

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This recipe replaces the older RemoveTraitsUsageRecipes, as indicated hre:

# - org.openrewrite.java.recipes.ExecutionContextParameterName
- org.openrewrite.java.recipes.IsLiteralNullRecipe
- org.openrewrite.java.recipes.MissingOptionExample
- org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes
- org.openrewrite.java.recipes.ExecutionContextParameterName:
parameterName: executionContext
- org.openrewrite.java.recipes.NoMutableStaticFieldsInRecipes

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was commented out above, but was recently extended to take a configurable variable name in response to the feedback received here:
openrewrite/rewrite-rewrite@c52c549

@Anmol202005
Copy link
Collaborator Author

@rdiachenko done. kindly review.
Since we have added the recipe to the build process.
removing it from CI makes sense ?

@rdiachenko
Copy link
Member

@Anmol202005

Since we have added the recipe to the build process.
removing it from CI makes sense ?

How fast to execute all recipes from rewrite.yml on localhost? Keeping them in ci instead of the build makes sense if local build takes lots of time (say, minutes). If not, then makes sense to me to remove from ci, since all recipes are run during verify phase and we fail ci when there is non-empty diff from running mvn clean verify.

@rdiachenko rdiachenko requested a review from timurt September 1, 2025 19:51
@rdiachenko rdiachenko self-assigned this Sep 1, 2025
@Anmol202005
Copy link
Collaborator Author

How fast to execute all recipes from rewrite.yml on localhost?

Total time: 19.178 s

@Anmol202005
Copy link
Collaborator Author

@rdiachenko done.

@Override
public J.CompilationUnit visitCompilationUnit(J.CompilationUnit cu, ExecutionContext ctx) {
public J.CompilationUnit visitCompilationUnit(J.CompilationUnit cu,
ExecutionContext executionContext) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see the addition of parameterName to ExecutionContextParameterName has helped consistency here. 🚀

Copy link
Member

@rdiachenko rdiachenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rdiachenko rdiachenko merged commit f50d2df into checkstyle:main Sep 2, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run XXXBestPractices recipes as part of maven build

3 participants